import request from '@/utils/request'


const api_name = '/eduservice/edu-chapter'
export default {
  //查询章节列表
  addCourseInfo(courseId) {
    return request({
      url: `${api_name}/getChapterVideo/${courseId}`,
      method: 'get',
    })
  },
  addChapter(chapter) {
    return request({
      url: `${api_name}/addChapter`,
      method: 'post',
      data:chapter
    })
  },
  getChapterInfo(chapterId) {
    return request({
      url: `${api_name}/getChapterInfo/${chapterId}`,
      method: 'get',
    })
  },
  updateChapter(chapter) {
    return request({
      url: `${api_name}/updateChapter`,
      method: 'post',
      data:chapter
    })
  },
  deleteChapter(chapterId) {
    return request({
      url: `${api_name}/${chapterId}`,
      method: 'delete',
    })
  },
  getCourseInfo(courseId) {
    return request({
      url: `/eduservice/edu-course/getCourseInfo/${courseId}`,
      method: 'get',
    })
  },
  updateCourseInfo(courseInfoVo) {
    return request({
      url: '/eduservice/edu-course/updateCourseInfo',
      method: 'post',
      data:courseInfoVo
    })
  }

}
